package cn.edu.scujcc.customofsichuan;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Second_huobajie extends AppCompatActivity implements View.OnClickListener {
    Button btn_activity,btn_history,btn_protection;

    private Toolbar back;
    private Bundle bundle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second_hbj);
        btn_activity=findViewById(R.id.Second_btn_activity);
        btn_history=findViewById(R.id.Second_btn_history);
        btn_protection=findViewById(R.id.Second_btn_protection);
        back = findViewById(R.id.back_secondPage_hbj);
        back.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        btn_activity.setOnClickListener(this);
        btn_history.setOnClickListener(this);
        btn_protection.setOnClickListener(this);

        bundle = new Bundle();

    }

    @Override
    public void onClick(View view) {
        Intent intent;
        switch (view.getId()){
            case R.id.Second_btn_activity:
                intent=new Intent(this, thirdPage_Detail.class);
                bundle.putString("title","火把节主要活动");
                bundle.putString("webUrl","file:///android_asset/hbj_activity.html");
                intent.putExtras(bundle);
                startActivity(intent);

                break;
            case R.id.Second_btn_history:
                intent=new Intent(this, thirdPage_Detail.class);
                bundle.putString("title","火把节历史渊源");
                bundle.putString("webUrl","file:///android_asset/hbj_history.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.Second_btn_protection:
                intent=new Intent(this, thirdPage_Detail.class);
                bundle.putString("title","火把节传承保护");
                bundle.putString("webUrl","file:///android_asset/hbj_protect.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;


        }


    }
}